Use static imports for Assertions.assertThat() consistently#48630
Conversation
Signed-off-by: Johnny Lim <izeye@naver.com>
snicoll
left a comment
There was a problem hiding this comment.
Thanks for the PR. We are not using the static import in assert implementations (main code). I think we should keep it this way. WDYT?
|
@snicoll Thanks for the feedback! I don't have a strong opinion on it. I just thought that it's prefered based on the following changes: 90faddf#diff-e9d603edb2e72b3fc962233b6ae08d6391b61bb776bc86ce2039df7860f05866R233 |
|
Good point, I remember reviewing this and then going with it as the OP is an AssertJ maintainer but I think we may want to reconsider this. I'll flag for team attention to get more feedback. |
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Vincent Potucek <vpotucek@me.com>
This comment was marked as resolved.
This comment was marked as resolved.
|
I don't feel particularly strongly about it, but I lean towards consistently using the static import in both main and test code. |
Signed-off-by: Vincent Potucek <vpotucek@me.com>
|
I don't have a strong opinion in either direction. |
|
Cool, thanks both. Let's go with the consistent option to use the static import then. |
See gh-48630 Signed-off-by: Johnny Lim <izeye@naver.com>
Does this mean the rule? It reads like so because consistency can only be achieved via some gatekeeper, which is currently not the case, as discovered in: |
Add a rule to ensure we consistently use `assertThat` rather than `Assertions.assertThat`. See gh-48630
|
@Pankraz76 Good idea, I've added a rule in 92263e7 |
|
ah nice thx, yes check also capable of doing, so we having all parties happy. Got some gate keeper and no new tool. well done. |
This PR changes to use static imports for
Assertions.assertThat()consistently where possible.